package com.lfy.modules.blog.domain.dto.role;

import com.lfy.modules.blog.domain.group.RemoveGroup;
import com.lfy.modules.blog.domain.group.SaveGroup;
import com.lfy.modules.blog.domain.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
public class RoleDTO {
    @NotNull(message = "id不能为空",groups = {UpdateGroup.class, RemoveGroup.class})
    @Null(message = "不能存在id",groups = {SaveGroup.class})
    private Long id;

    @NotBlank(message = "角色名不能为空",groups = {SaveGroup.class})
    private String roleName;
    @NotBlank(message = "角色标识不能为空",groups = {SaveGroup.class})
    private String roleKey;
    @NotNull(message = "角色等级不能为空",groups = {SaveGroup.class})
    private Integer roleLev;
}
